package com.ucode.springboot.starter.security.entity;
import java.util.Collection;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

/**
 * 自定义令牌对象
 * @author: liliang
 * @date: 2019年12月20日 下午6:17:50
 */
public class UcodeAuthenticatioToken extends UsernamePasswordAuthenticationToken{

    private static final long serialVersionUID = -8231192461503851758L;
    
    private String token;

    public UcodeAuthenticatioToken(Object principal, Object credentials) {
        super(principal, credentials);
    }
    
    public UcodeAuthenticatioToken(Object principal, Object credentials, String token){
        super(principal, credentials);
        this.token = token;
    }
    
    public UcodeAuthenticatioToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities, String token) {
        super(principal, credentials, authorities);
        this.token = token;
    }
    
    public String getToken() {
        return token;
    }
    
    public void setToken(String token) {
        this.token = token;
    }

}
